<template>
  <div class="footer-box">
    <div class="footer-content">
      <div class="footer-href">
        <div class="footer-href-item nas tse" @click="toHome()">首页</div>
        <div class="footer-href-item-split"></div>
        <div class="footer-href-item nas tse" @click="toCategory(1)">生活服务</div>
        <div class="footer-href-item-split"></div>
        <div class="footer-href-item nas tse" @click="toCategory(2)">商务服务</div>
        <div class="footer-href-item-split"></div>
        <div class="footer-href-item nas tse" @click="toCategory(3)">宠物</div>
        <div class="footer-href-item-split"></div>
        <div class="footer-href-item nas tse" @click="toIssueNews()">信息发布</div>
        <div class="footer-href-item-split"></div>
        <div class="footer-href-item nas tse" @click="toReport()">平台投诉中心</div>
        <div class="footer-href-item-split"></div>
        <div class="footer-href-item nas tse" @click="toWebsiteReport()">虚拟网站投诉</div>
      </div>
      <div class="footer-copyright">Copyright ©2010 - 2024 湖南中娱互动网络科技有限公司 All rights reserved.</div>
      <div class="footer-copyright">备案号：湘ICP备2024083317号-1</div>
      <div class="footer-copyright">
        <span>地址: 湖南湘江新区望岳街道观沙路160号八方小区B栋铺面153</span>
        <span style="margin-left: 16px">联系电话：17373110625</span>
        <span style="margin-left: 16px">服务时间 9:00-12:00；14:00-17:00 周一至周五</span>
      </div>
    </div>
  </div>
</template>

<script>
import { mapState } from 'vuex'

export default {
  name: 'footer',

  computed: {
    ...mapState({
      isLogin: (state) => state.common.isLogin
    })
  },

  data() {
    return {}
  },

  mounted() {},

  methods: {
    toHome() {
      this.$router.push('/')
    },

    toCategory(type) {
      this.$router.push('/category?type=' + type)
    },

    toIssueNews() {
      if (!this.isLogin) {
        this.$toast('请先登录!', {
          type: 'error'
        })
        return
      }

      this.$router.push('/issueNews')
    },

    toReport() {
      if (!this.isLogin) {
        this.$toast('请先登录!', {
          type: 'error'
        })
        return
      }

      this.$router.push('/report')
    },

    toWebsiteReport() {
      window.open('https://www.12377.cn/', '_blank')
    }
  }
}
</script>

<style lang="scss" scoped>
.footer-box {
  min-width: 1460px;
  color: #828698;
  background: #f1f1f1;

  display: flex;
  justify-content: center;

  .footer-content {
    width: 1440px;
    height: 160px;

    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;

    .footer-href {
      display: flex;
      justify-content: center;
      align-items: center;

      .footer-href-item {
        font-size: 14px;
      }

      .footer-href-item-split {
        margin-left: 8px;
        margin-right: 8px;
        width: 1px;
        height: 24px;
        background: #b8b8b8;
      }
    }

    .footer-copyright {
      margin-top: 10px;
      font-size: 12px;
    }
  }
}
</style>
